<div class="content_box">
  <h1>Enviar por e-mail</h1>
  <div class="content">
    <form action="<?php echo url_for('@send_email') ?>" method="post">
      <input type="hidden" name="type" value="<?php echo $objectType ?>" />
      <input type="hidden" name="id" value="<?php echo $object->getId() ?>" />

      <ul class="error_list">
<?php foreach($errorMessages as $message) : ?>
        <li><?php echo $message ?></li>
<?php endforeach; ?>
      </ul>

      <table class="form">
        <tfoot>
          <tr>
            <td colspan="2">
              <a class="btn darkblue" href="<?php echo $returnUrl ?>">Cancelar</a>
              <input class="submit_btn darkblue" type="submit" value="Enviar" />
            </td>
          </tr>
        </tfoot>
        <tbody>
          <tr>
            <th>Para</th>
            <td>
              <ul class="options_list">
              <?php foreach($emailLists as $email) : ?>
                <li>
                  <input type="checkbox" name="email_list[]" value="<?php echo $email->getEmailList() ?>" ><?php echo $email->getName() ?>&nbsp;(<?php echo $email->getEmailList() ?>)</input>
                </li>
              <?php endforeach; ?>
              </ul>
            </td>
          </tr>
          <tr>
            <th>T&iacute;tulo</th>
            <td>
              <input type="text" class="large" name="email_summary" value="Atualiza&ccedil;&atilde;o no site" />
            </td>
          </tr>
          <tr>
            <th>Texto</th>
            <td>
              <textarea id="email_text" name="email_text"><?php echo include_component('default', 'emailTemplate', array('object' => $object)) ?></textarea><script type="text/javascript">tinyMCE.init({mode:"exact", elements:"email_text", theme:"advanced", theme_advanced_toolbar_location:"top", theme_advanced_toolbar_align:"left", theme_advanced_statusbar_location:"bottom", theme_advanced_resizing:true, relative_urls:false, remove_script_host:false});</script>
            </td>
          </tr>
        </tbody>
      </table>
    </form>
  </div>
</div>
